export function convertToGMTString (date: Date){
    const month = date.getMonth()<9? `0${date.getMonth() + 1}` : (date.getMonth()+1).toString();
  return `${date.getFullYear()}-${month}-${date.getDate()} 00:00:00`;
}

export function convertToLocalDateString (time: string) {
    if (!time) {
      return '';
    }
    if(time === '0000-00-00 00:00:00') {
        return '';
    }
  const splitList = new Date(time).toLocaleDateString().split('/');
  return `${splitList[0]}-${splitList[1]}-${splitList[2]}` // windows
  // return `${splitList[2]}-${splitList[0]}-${splitList[1]}`
 }

 export function getCurrentDate () {
  const splitList = new Date(Date.now()).toLocaleDateString().split('/');
  return `${splitList[0]}-${splitList[1]}-${splitList[2]}` // windows
  // return `${splitList[2]}-${splitList[0]}-${splitList[1]}`
 }